package com.minelx.statementsplus.cha.base;

import java.util.Objects;

public final class TunnelDoWorkResponse {

	private final String content;

	private final int bval;

	private final boolean isEnd;

	TunnelDoWorkResponse(String content, int bval, boolean isEnd) {
		this.content = content;
		this.bval = bval;
		this.isEnd = isEnd;
	}

	public String content() {
		return content;
	}

	public int bval() {
		return bval;
	}

	public boolean isEnd() {
		return isEnd;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == this) return true;
		if (obj == null || obj.getClass() != this.getClass()) return false;
		TunnelDoWorkResponse that = (TunnelDoWorkResponse) obj;
		return Objects.equals(this.content, that.content) &&
				this.bval == that.bval &&
				this.isEnd == that.isEnd;
	}

	@Override
	public int hashCode() {
		return Objects.hash(content, bval, isEnd);
	}

	@Override
	public String toString() {
		return "TunnelDoWorkResponse[" +
				"content=" + content + ", " +
				"bval=" + bval + ", " +
				"isEnd=" + isEnd + ']';
	}
}
